<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?php set::get('site_name'); ?></title>
		<meta http-equiv="Content-Type" content="text/html;UTF-8" />
		<link rel="stylesheet" type="text/css" href="template/style.css" />
	</head>
	<body class="sidebar">
		<div id="sidebar_sidebar">
			<div id="sidebar_header">
				<h1>ACP</h1>
			</div>
			
			<?php
				
				if (!empty($this->pages))
				{
					
					@ksort($this->pages);
					foreach($this->pages as $cat => $pages)
					{
						@ksort($pages);
						?>
							<ul class="sidebar_container">
								<li class="heading"><?php echo ucwords(str_replace('_', ' ', $cat)); ?></li>
								<?php
									foreach($pages as $name => $url)
									{
										$name = str_replace('_s_', '\'s ', $name);
										$name = str_replace('_', ' ', $name);
										echo '<li><a href="'.$url.'" target="main">'. ucwords($name) .'</a></li>';
									}
								?>
							</ul>
						<?php
					}
				}
				else
				{
			?>
				<ul class="sidebar_container">
					<li class="heading">Navigation</li>
					<li><a href="#">This menu is unavailable at the moment.</a></li>
				</ul>
			<?php
				}
			?>
		</div>
	</body>
</html>